<?php


namespace app\index\controller;


use app\BaseController;
use app\index\business\tradeBus;

class Trade extends BaseController
{
    public function getTradeChildByWhere(){
        $trade_id = $this->request->param('trade_id');
        $where = [
            "trade_id" => $trade_id,
        ];
        $tradeBus = new tradeBus();
        $result = $tradeBus->getTradeChildByWhereBus($where);
        if(empty($result)){
            throw new \think\Exception('未查询到数据');
        }
        return show(config('status.success'),'获取成功',$result);
    }
    public function getTradeList(){
        $tradeBus = new tradeBus();
        $result = $tradeBus->getTradeListBus();
        return show(config('status.success'),'获取成功',$result);;
    }
}